﻿//==========================================================
// 此代码由TilverNET代码生成工具自动生成，请不要修改
// 代码生成器核心库版本号：1.2
// 作者：landy
// 联系方式：(QQ)86566178
// 创建时间：2013/10/25 14:01:26
//==========================================================

using System;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using System.Linq;
using MySql.Data;
using Tilver.Data;
using Tilver.Data.DataPager;

namespace Tilver.Mysql.DAL.Tilverdb
{
	#region EO


	#endregion
	#region  PO

	/// <summary>
	///  《P_AddCustomerInfo(逻辑类)》
	/// </summary>
	public class PAddCustomerInfoPO : DbManagerBase
	{
		private const string _procName = "P_AddCustomerInfo";

		/// <summary>
		/// 存储过程名称
		/// </summary>
		public string ProcName
		{
			get { return _procName; }
		}

		/// <summary>
		/// 构造函数
		/// </summary>
		/// <param name = "routeData">路由数据</param>
		public PAddCustomerInfoPO(object routeData = null) : base(routeData) { }

		/// <summary>
		/// 构造函数
		/// </summary>
		/// <param name = "connectionStringName">连接字符串名称</param>
		public PAddCustomerInfoPO(string connectionStringName) : base(connectionStringName) { }


		/// <summary>
		/// 存储过程操作对象
		/// </summary>
		/// <return></return>
		private DbAdoBase AdoBase()
		{
			return DataBase.CreateDbAdo(_procName, CommandType.StoredProcedure);
		}




		/// <summary>
		/// 执行存储过程并返回受影响的行数
		/// </summary>
		/// <param name = "cityId"></param>
		/// <param name = "userName"></param>
		/// <param name = "phone"></param>
		/// <param name = "address"></param>
		/// <param name = "cType"></param>
		/// <param name="tm">事务管理对象</param>
		/// <return></return>
		public int ExecuteNonQuery(int? cityId, string userName, string phone, string address, sbyte? cType, TransactionManager tm = null)
		{
			var adoBase = AdoBase();
			var ret = adoBase
				.AddInParameter("@CityId", cityId, DbType.Int32, 0)
				.AddInParameter("@UserName", userName, DbType.String, 50)
				.AddInParameter("@Phone", phone, DbType.String, 50)
				.AddInParameter("@Address", address, DbType.String, 100)
				.AddInParameter("@CType", cType, DbType.SByte, 0)
				.ExecuteNonQuery(tm);
			return ret;
		}

	}


	#endregion
}
